# -*- mode: snippet -*-
# name: sv_miss
# key: svmiss
# --
systask command "del `(let* ((filenamedir (split-string (file-name-directory (buffer-file-name)) "/"))
(currentdir (downcase (nth 9 filenamedir)))
(status2 (downcase (substring (nth 5 filenamedir) 0 2))))
(concat "&" status2 "_drroutput" currentdir ".\*.xlsx"))`";

%`(downcase (substring (nth 5 (split-string (buffer-file-name) "/")) 0 2))`_creatework(libname=raw1);

%`(downcase (substring (nth 5 (split-string (buffer-file-name) "/")) 0 2))`_missuser(libname=work
, visitvar=folder_name
, rmtab=$0
);

%sv_export(dt=list
, sort=scrnum
, rank=dataname subscnum scrnum misst desc
, title=`(file-name-base (buffer-file-name))`
, status=`(downcase (substring (nth 5 (split-string (buffer-file-name) "/")) 0 2))`
, meth=`(let* ((filedir (nth 9 (split-string (file-name-directory (or load-file-name buffer-file-name)) "/"))))
(if (string= filedir "")
(downcase "")
(downcase (substring filedir 0 2))))`
, out=DRR_`(if (>= (string-to-number (nth 1 (split-string (buffer-name) " "))) 10)
(nth 1 (split-string (buffer-name) " "))
(concat "0" (nth 1 (split-string (buffer-name) " "))))`);